//Will Zepeda
//GSP-362
//Light.h
//class wrapper to D3DLIGHT9
#pragma once
#include "DX include.h"
#include "Globals.h"

class Input;

class Light
{
private:
	D3DLIGHT9	mLight;
	D3DXCOLOR	ambColor;
	D3DXCOLOR	difColor;
	D3DXCOLOR	specColor;
	float		mRange;

public:
	Light();
	~Light();

	void setLightType(int);

	void setAmbientLight(D3DXCOLOR);
	void setAmbientLight(float, float, float, float);

	void setDiffuseLight(D3DXCOLOR);
	void setDiffuseLight(float, float, float, float);

	void setSpecularLight(D3DXCOLOR);
	void setSpecularLight(float, float, float, float);

	void setRange(float);
	float getRange(){ return mRange; }
	void setPosition(float, float, float);

	//only matters if light is SPOT or DIRECTIONAL
	void setDirection(D3DXVECTOR3);
	void setDirection(float, float, float);

	//Assigns a set of lighting properties for this device.
	HRESULT setLightToDevice(int);
	HRESULT enableLight(int, bool);

	//updates color values for lights
	void Update(Input *, int);
};

